import Taro, {Component, Config} from "@tarojs/taro";
import {View, Image, Text} from "@tarojs/components";
import {getRuntime} from '../../utils/common';
import './index.less'
import icon_05 from "../../assets/img/icon_05.png";
import icon_06 from "../../assets/img/icon_06.png";
import icon_08 from "../../assets/img/icon_08.png";
import icon_09 from "../../assets/img/icon_09.png";
import icon_10 from "../../assets/img/icon_10.png";
import icon_11 from "../../assets/img/icon_11.png";
import icon_12 from "../../assets/img/icon_12.png";
import icon_13 from "../../assets/img/icon_13.png";
import icon_14 from "../../assets/img/icon_14.png";
import icon_15 from "../../assets/img/icon_15.png";

// 全部服务
class Personnel extends Component {
  constructor(props) {
    super(props)
  }

  componentWillMount(): void {
    Taro.setNavigationBarTitle({title: '全部服务'})
  }

  handelRouter(url: string = '/pages/index/index'): void {
    getRuntime().navigateTo(url)
  }

  render() {
    return (
      <View className='all-index'>
        <View className='index-nav'>
          <View className='nav' onClick={this.handelRouter.bind(this, '/pages/all_services/none')}>
            <Image className='nav-icon' src={icon_05}/>
            <Text className='nav-title'>政府政务中心</Text>
          </View>
          <View className='nav' onClick={this.handelRouter.bind(this, '/pages/legal/index')}>
            <Image className='nav-icon' src={icon_06} />
            <Text className='nav-title'>律政中心</Text>
          </View>
          <View className='nav' onClick={this.handelRouter.bind(this, '/pages/finance/index')}>
            <Image className='nav-icon' src={icon_08}/>
            <Text className='nav-title'>工程金融中心</Text>
          </View>
          <View className='nav' onClick={this.handelRouter.bind(this, '/pages/business/index')}>
            <Image className='nav-icon' src={icon_09}/>
            <Text className='nav-title'>工商服务中心</Text>
          </View>
          <View className='nav' onClick={this.handelRouter.bind(this, '/pages/library/index')}>
            <Image className='nav-icon' src={icon_10}/>
            <Text className='nav-title'>建务库中心</Text>
          </View>
          <View className='nav' onClick={this.handelRouter.bind(this, '/pages/company_credit/index')}>
            <Image className='nav-icon' src={icon_11}/>
            <Text className='nav-title'>企业信用中心</Text>
          </View>
          <View className='nav' onClick={this.handelRouter.bind(this, '/pages/newest/personnel_center')}>
            <Image className='nav-icon' src={icon_12}/>
            <Text className='nav-title'>工程人才中心</Text>
          </View>
          <View className='nav' onClick={this.handelRouter.bind(this, '/pages/business_school/index')}>
            <Image className='nav-icon' src={icon_13} />
            <Text className='nav-title'>建企商学院</Text>
          </View>
          <View className='nav' onClick={this.handelRouter.bind(this, '/pages/tendering/index')}>
            <Image className='nav-icon' src={icon_14} />
            <Text className='nav-title'>投招标中心</Text>
          </View>
          <View className='nav' onClick={this.handelRouter.bind(this, '/pages/mall/index')}>
            <Image className='nav-icon' src={icon_15} />
            <Text className='nav-title'>新零售商城</Text>
          </View>
          <View className='nav' onClick={this.handelRouter.bind(this, '/pages/all_services/none')}>
            <Image className='nav-icon' src={icon_15} />
            <Text className='nav-title'>建企OA办公</Text>
          </View>
          <View className='nav' onClick={this.handelRouter.bind(this, '/pages/all_services/life')}>
            <Image className='nav-icon' src={icon_15} />
            <Text className='nav-title'>生活服务中心</Text>
          </View>
        </View>
      </View>
    )
  }
}

export default Personnel
